//
//  shop_detail_cell.m
//  pmmSS
//
//  Created by Mac book on 2017/9/22.
//  Copyright © 2017年 WTFSSD. All rights reserved.
//

#import "shop_detail_cell.h"

@implementation shop_detail_cell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubViews];
    }
    return self;
}

-(void)initSubViews{


    WeakSelf(weakSelf);

    _iconImageView =  [[UIImageView alloc] init];

    // _iconImageView.backgroundColor = RGBA(253, 138, 40, 1);
    [_iconImageView setImage:[UIImage imageNamed:@"list_icon_shop"]];

    [self.contentView addSubview:_iconImageView];


    _title_Label = [ HMLabel createLabelWithText:@"304不锈钢棒 直条 不锈钢 304不锈钢棒 直条 不锈钢" andTextColor:[UIColor blackColor]andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(14)] andTextAlignment:NSTextAlignmentLeft];
    _title_Label.numberOfLines = 2 ;
    [self.contentView addSubview:_title_Label];


    _icon_price_label  = [ HMLabel createLabelWithText:@"￥" andTextColor:RGBA(252,74,0,1) andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(12)] andTextAlignment:NSTextAlignmentLeft];
    [self.contentView addSubview:_icon_price_label];


    _price_Label = [ HMLabel createLabelWithText:@"998366" andTextColor:RGBA(252,74,0,1) andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(14)] andTextAlignment:NSTextAlignmentLeft];
    [self.contentView addSubview:_price_Label];


    UIImageView *rightImage = [[UIImageView alloc]init];
    [rightImage setImage:[UIImage imageNamed:@"icon_arrow_right_gray"]];
    [self.contentView addSubview:rightImage];


    [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf.contentView);
        make.left.mas_equalTo(autoScaleW(10));
        make.width.mas_equalTo(autoScaleW(75));
        make.height.mas_equalTo(autoScaleH(75));

    }];

    [_title_Label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.top.mas_equalTo(weakSelf.contentView).offset(autoScaleH(10));
        make.left.mas_equalTo(autoScaleW(95));
        make.right.mas_equalTo(autoScaleW(-30));

    }];

    [_icon_price_label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.left.mas_equalTo(weakSelf.contentView).offset(autoScaleW(95));
        make.bottom.mas_equalTo(weakSelf.iconImageView).offset(autoScaleH(-3));
        make.width.mas_equalTo(autoScaleW(10));
        make.height.mas_equalTo(autoScaleH(17));

    }];

    [_price_Label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.bottom.mas_equalTo(weakSelf.iconImageView).offset(autoScaleH(-3));
        make.left.mas_equalTo(autoScaleW(95 + 15));
        make.right.mas_equalTo(autoScaleW(-30));

    }];

    [rightImage mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf.contentView);
        make.right.mas_equalTo(weakSelf.contentView).offset(autoScaleW(-15));
        make.height.mas_equalTo(autoScaleW(11));
        make.width.mas_equalTo(autoScaleH(6));
        
    }];
    

}
@end
